package cn.kgc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("employee")
public class Emp implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @TableField("empName")
    private String empName;
    private String password;
    private String email;
    private Integer gender;
//    @DateTimeFormat(pattern = "yyy-MM-dd")
    private Date birth;
    private Integer deptId;

    @TableField(exist = false)
    private Dept dept;    //为了便于页面展示名称，人为增加的属性
}
